{% extends "base.html" %}
{% load i18n %}
{% block current_page %}Courses{% endblock %}
{% block content %}
    <div id="content">
    {% if request.user.is_authenticated %}
        <h1>Courses</h1>
                <p>Courses for {{ request.user.username }}</p>
        {% if course_list %}
        <ul>
            {% for course in course_list %}
            <li><a href="/course/{{ course.id }}/">{{ course.name }}</a></li>
            {% endfor %}
        </ul>
        {% else %}
        <p>No courses are available.</p>
                <a href="/admin/">Set up courses</a>
        {% endif %}
    {% else %}
        <p>Please login to continue</p>
    {% endif %}
    </div>
    <div class="break"></div>
</div>
{% endblock %}